package com.css.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 省市级行政区划
 */
@Getter
@AllArgsConstructor
public enum SsjxzqhEnum {
	
    BJS("110000","北京市"),
    TJS("120000","天津市"),
    HEBS("130000","河北省"),
    SHANGXS("140000","山西省"),
    NMGZZQ("150000","内蒙古自治区"),
    LNS("210000","辽宁省"),
    JLS("220000","吉林省"),
    HLJS("230000","黑龙江省"),
    SHS("310000","上海市"),
    JSS("320000","江苏省"),
    ZJS("330000","浙江省"),
    AHS("340000","安徽省"),
    FJS("350000","福建省"),
    JXS("360000","江西省"),
    SDS("370000","山东省"),
    HENS("410000","河南省"),
    HUBS("420000","湖北省"),
    HUNS("430000","湖南省"),
    GDS("440000","广东省"),
    GXZZZZQ("450000","广西壮族自治区"),
    HAINS("460000","海南省"),
    CQS("500000","重庆市"),
    SCS("510000","四川省"),
    GZS("520000","贵州省"),
    YNS("530000","云南省"),
    XZZZQ("540000","西藏自治区"),
    SHANXS("610000","陕西省"),
    GSS("620000","甘肃省"),
    QHS("630000","青海省"),
    NXHZZZQ("640000","宁夏回族自治区"),
    XJWWEZZQ("650000","新疆维吾尔自治区");
    private final String dm;

    private final String mc;

    public static String getMc(String dm) {
        SsjxzqhEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
